// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import 'babel-polyfill'
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import axios from './utils/http'
import ElementUI from 'element-ui'

import API from './config/api'

// 引入第三方样式
import 'normalize.css'
import './theme/index.css'
import './assets/scss/common.scss'

// 引入分页组件
import vPagination from './components/pagination'

// 引入权限过滤器
import hasPermission from './utils/hasPermission'

Vue.config.productionTip = false

// 定义全局API域名
Vue.prototype.$api = API
// 定义全局axios方法
Vue.prototype.$http = axios

Vue.use(ElementUI)
Vue.use(hasPermission)

Vue.component('v-pagination', vPagination)

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
